﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DelonixRegiaHMSys.Core.Models;
using DelonixRegiaHMSys.Infrastructure.Data;
using DelonixRegiaHMSys.Core.Services;
namespace DelonixRegiaHMSys.UI.WebForms.HousekeepingandStaffModule
{
    public partial class AssignSchedule : System.Web.UI.Page
    {
        string userID;
        protected void Page_Load(object sender, EventArgs e)
        {
            userID = Request.QueryString["UserID"];
            if (!IsPostBack)
            {
                BindGridView();
            }
        }

        private void BindGridView()
        {
            var roservice = new roServices(new EfRoomQuery());
            string status = "SFC";
            DataListRoomClean.DataSource = roservice.GetAllRoom(status).ToList();
            DataListRoomClean.DataBind();
        }

        protected void lbtn_Click(object sender, EventArgs e)
        {
            string a = ((LinkButton)sender).CommandArgument;
            string querystring = "UserID=" + userID + "&RoomNum=" + a;
            Server.Transfer("~/WebForms/HousekeepingandStaffModule/Schedulling.aspx?" + querystring);
        }

        protected void backbtn_Click(object sender, EventArgs e)
        {
            Server.Transfer("~/WebForms/SystemAccountModule/MainPage.aspx?UserID=" + userID);
        }

    }
}